package com.learner.pojo.course;

import lombok.Data;
import lombok.ToString;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;


/**
* @Description: 课程评论
* @Author: ice2020x
* @Date: 2021/11/12
*/
@Data
@ToString
@Entity
@Table(name = "course_comment")
@GenericGenerator(name = "jpa-uuid", strategy = "uuid")
@EntityListeners(AuditingEntityListener.class)
public class CourseComment implements Serializable {
    private static final long serialVersionUID = -8135454958499203278L;
    @Id
    @GeneratedValue(generator = "jpa-uuid")
    @Column(length = 32)
    private String id;

    @CreatedDate
    @Column(name = "gmt_create")
    private Date gmtCreate;

    @Column(name = "teacher_id")
    private String teacherId;

    @Column(name = "course_id")
    private String courseId;

    @Column(name = "member_id")
    private String memberId;

    private String nickname;

    private String avatar;

    private String score;
    private String content;
    /**
     * 修改时间
     */
    @LastModifiedDate
    @Column(name = "gmt_modified")
    private Date gmtModified;
}
